package com.yidu.ReportManagement.mapper;

import com.yidu.ReportManagement.entity.ChengjiaoQingSuan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author 梁俊
 * @date 2023/2/9
 * &@version 1.0
 */
@Mapper
public interface ChengjiaoQingSuanMapper {
    /**
     * 成交清算轧差表
     * @param map
     * @return
     */
    @Select("SELECT s.securityId,s.securityName,d.dealNumber,d.commissionFees,d.transferFee,d.handle,d.stampDuty,d.control,d.dealMoney,d.endMoney FROM SECURITY s INNER JOIN dealData d ON s.securityId=d.securityId WHERE d.dealTime LIKE #{dealTime} LIMIT #{page},#{limit}")
    public List<ChengjiaoQingSuan> selectChengjiaoQingSuan(Map map);

    /**
     * 查询行数
     * @param dealTime
     * @return
     */
    @Select("SELECT count(*) FROM SECURITY s INNER JOIN dealData d ON s.securityId=d.securityId WHERE d.dealTime LIKE #{dealTime}")
    public int selectCount(String dealTime);
}
